from matplotlib import pyplot

name='/home/jonk/simulaciones/Espresso/confinado/polydisperse/u30/L0.5/stressTensor.dat'

#ciclomin=10
#nciclos=600
#npc=30
#count=0
#fout = open("salida.dat",'w')
#imin=ciclomin*npc-2
#imax=imin+nciclos*npc
#
#for line in file(name):
#    if count>imax:
#        break
#    if count>imin:
#        fout.write(line)
#    count+=1
#fout.close()

name = '/home/jonk/projects/correlador/tonto'
datos=[]
for line in file(name):
    line=line.replace('\n','')
    val=line.split(' ')
    for v in val:
        if v!='':
            datos.append(float(v))

x=range(len(datos))

pyplot.plot(x,datos,'b-')
pyplot.show()